package com.onLineCar.dispatch.entity.volidEnum;

import com.onLineCar.dispatch.entity.orderEnum.OrderStatusEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

@Getter
@AllArgsConstructor
public enum ValidateEnum {
    HAVE_DRIVER(1,"目前时间段城市附件没有可服务的司机"),
    HAVE_BILLING_RULE(2,"目前该城市没有计费规则"),
    IS_BLOCK_USER(3,"此用户是黑名单用户拒绝派单"),
    HAVE_OTHER_ORDER(4,"此用户的账户有之前的订单还未支付完成");

    private Integer validateCode;

    private String validateDesc;

    public static String getValidateDescByCode(Integer validateCode) {
        ValidateEnum[] values = ValidateEnum.values();
        for (ValidateEnum value : values) {
            if (validateCode.equals(value.validateCode)) {
                return value.validateDesc;
            }
        }
        return null;
    }
}
